class Usuario < ActiveRecord::Base

    validates_uniqueness_of :email
    validates_format_of :email, :with => %r{^(?:[_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-zA-Z0-9\-\.]+)*(\.[a-z]{2,4})$}i
    validates_confirmation_of :password, :if => :password_changed?
    
    def senha
        
    end

    def senha=(v)
        if not v.nil? and v != "":
            self.password = v
        end
    end


end
